package main

import (
	"fmt"
	"go_data_structures_and_algorithms/system_class/section8/pojo"
)

func main() {
	ints := []int{4, 5, 3, 1, 2}
	heap := pojo.NewStrongHeap(func(i int, i2 int) bool {
		return i < i2
		//小于是降序
	})
	for i := 0; i < len(ints); i++ {
		heap.Add(ints[i])

	}
	heap.Print()
	strongInt := heap.Array[3]
	strongInt.Value = 9
	heap.Resign(strongInt)
	heap.Print()

	contains := heap.Contains(strongInt)
	fmt.Println(contains)
	heap.Print()
	heap.Remove(heap.Array[2])
	heap.Print()
}
